<?php

/**
 * Class companiesModel
 * 采集机器人数据表
 */
class gathererModel extends baseModel{
	protected $table = 'gatherer';

    public function getPagePage(){
        $condition = 'classification="0" AND gathererid!=0';
        return $this->model->table($this->table)->where($condition)->select();
    }

    public function getListPage($id){
        $condition = 'classification="1" AND pid='.$id;
        return $this->model->table($this->table)->where($condition)->select();
    }

    public function getDetailsPage($id){
        $condition = 'classification="2" AND pid='.$id;
        return $this->model->table($this->table)->where($condition)->select();
    }

    //gathererid=0是通用数据，不能删除不能占用
    public function getInit(){
        $condition = 'gathererid=0';
        return $this->model->table($this->table)->where($condition)->select();
    }
}